package com.yingdong.handler;

import org.springframework.stereotype.Service;

import com.yingdong.annotation.NoCheckPlayer;
import com.yingdong.annotation.OpCode;
import com.yingdong.message.HeartBeatMessage;
import com.yingdong.opcode.ServerOpcode;
import com.yingdong.sceneserver.inner.message.RecvGameMessage;
import com.yingdong.sceneserver.net.GameUserSession;

@Service
public class HeartBeatHandler {
	@NoCheckPlayer()
	@OpCode(id = ServerOpcode.HEARTBEAT)
	public static void handleHeartBeat(GameUserSession session, RecvGameMessage msg) {
		session.setLastHeartBeatTimestamp(System.currentTimeMillis());
		new HeartBeatMessage().sendToClient(session);
	}
}
